package com.chengyu.eyc.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.chengyu.eyc.utils.EycGenId;
import com.fasterxml.jackson.annotation.JsonFormat;

import tk.mybatis.mapper.annotation.KeySql;

@Table(name = "eyc_vehicle_av_addr")
public class EycVehicleAvAddr extends BaseModel implements Serializable {
    private static final long serialVersionUID = 1L;

    @KeySql(genId = EycGenId.class)
    @Id
    @Column(name = "VEHICLE_AV_ADDR_UUID")
    private String vehicleAvAddrUuid;

    @Column(name = "USER_ID")
    private String userId;
    
    @Column(name = "ADDR")
    private String addr;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @Column(name = "APPOINTMENT_TIME")
    private Date appointmentTime;

    @Column(name = "CONTACT")
    private String contact;

    @Column(name = "CONTACT_NUM")
    private String contactNum;

    @Column(name = "REMARK")
    private String remark;

    /**
     * @return ADDR
     */
    public String getAddr() {
        return addr;
    }

    /**
     * @return APPOINTMENT_TIME
     */
    public Date getAppointmentTime() {
        return appointmentTime;
    }

    /**
     * @return CONTACT
     */
    public String getContact() {
        return contact;
    }

    /**
     * @return CONTACT_NUM
     */
    public String getContactNum() {
        return contactNum;
    }

    /**
     * @return REMARK
     */
    public String getRemark() {
        return remark;
    }

    /**
     * @return USER_ID
     */
    public String getUserId() {
        return userId;
    }

    /**
     * @return VEHICLE_AV_ADDR_UUID
     */
    public String getVehicleAvAddrUuid() {
        return vehicleAvAddrUuid;
    }

    /**
     * @param addr
     */
    public void setAddr(String addr) {
        this.addr = addr == null ? null : addr.trim();
    }

    /**
     * @param appointmentTime
     */
    public void setAppointmentTime(Date appointmentTime) {
        this.appointmentTime = appointmentTime;
    }

    /**
     * @param contact
     */
    public void setContact(String contact) {
        this.contact = contact == null ? null : contact.trim();
    }

    /**
     * @param contactNum
     */
    public void setContactNum(String contactNum) {
        this.contactNum = contactNum == null ? null : contactNum.trim();
    }

    /**
     * @param remark
     */
    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    /**
     * @param userId
     */
    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    /**
     * @param vehicleAvAddrUuid
     */
    public void setVehicleAvAddrUuid(String vehicleAvAddrUuid) {
        this.vehicleAvAddrUuid = vehicleAvAddrUuid == null ? null : vehicleAvAddrUuid.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", vehicleAvAddrUuid=").append(vehicleAvAddrUuid);
        sb.append(", userId=").append(userId);
        sb.append(", addr=").append(addr);
        sb.append(", appointmentTime=").append(appointmentTime);
        sb.append(", contact=").append(contact);
        sb.append(", contactNum=").append(contactNum);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}